Field of the Invention
The present invention relates to an information processing apparatus, a method for controlling the same, and a non-transitory computer-readable medium. In particular, the present invention relates to a resource management technology employed in an information processing apparatus that causes a plurality of applications to operate on a single process.
Description of the Related Art
A multi-function peripheral (MFP), which is a type of information processing apparatuses, is capable of causing applications, which achieve the function of, for example, copying, scanning, and printing of documents, to operate. Such applications are often executed on the same process in an MFP in order to suppress the amount of CPU usage and memory usage. It is possible to know the total amount of memory that is used on a single process, and accordingly, when only a single application is executed, it is also possible to know the amount of memory used by the application. However, when a plurality of applications are executed on a single process, it is difficult to know the amount of memory used by each application because it is only possible to know the amount of memory used by the entire process.
The amount of memory used by each application can be measured by, for example, dumping the contents of the heap memory that is in use (hereinafter “heap dump”), and analyzing the contents by using an information processing apparatus other than the MFP. Alternatively, the amount of memory used by each application can be measured on the MFP by modifying the applications so that every application performs a memory usage measurement. However, it is impossible to perform a memory usage measurement without modifying the configurations of the existing applications.
Meanwhile, Japanese Patent Laid-Open No. 2011-238233 discloses a method for performing a performance analysis without modifying existing applications. According to the method disclosed in Japanese Patent Laid-Open No. 2011-238233, the performance of an application that is being executed can be analyzed by monitoring the bytecode of a class that is loaded by an existing application, dynamically specifying a method that is to be executed by the application, and measuring the execution time.
However, with the method disclosed in Japanese Patent Laid-Open No. 2011-238233, it is impossible to analyze the memory used by the application.